<?php
/*
  Document   : admin
  Created on : 12-mei-2011, 12:05:08
  Author     : Shahram abdi
  Description:
 */

// reference the file containing the profiel class
require_once("nieuwsDB.class.php");

// retrieve the operation to be performed
$mode = $_POST['mode'];

// create a new profiel instance
$beheer = new Beheer();

// Clear the output
if (ob_get_length ())
    ob_clean();

// retrieve new messages from the server
if ($mode == 'RetrieveAllNew') {
    echo json_encode($beheer->retrieveAllNews());
}

if ($mode == 'RetrieveAllContracts') {
    echo json_encode($beheer->retrieveAllContracts());
}


if ($mode == 'RetrieveAllStudents') {
    echo json_encode($beheer->retrieveAllStudents());
}
?>
